package capstone.tagit;

import java.util.Comparator;
import java.util.Date;

public class TagComparator implements Comparator<Tag> {

	@Override
	public int compare(Tag tag0, Tag tag1) {
		if (tag0.equals(tag1)){
			return 0;
		}
		Date d0 = tag0.getDate();
		Date d1 = tag1.getDate();
		return d1.compareTo(d0);
	}
}
